package com.walle.concurrenttest.pattern.future;

/**
 * @author zhangjiapeng
 * @Package com.walle.concurrenttest.pattern.future
 * @Description: ${todo}
 * @date 2019/2/25 14:57
 */
public class RealData {

    private final String content;

    public RealData(int count,char c) {
        System.out.println("RealData " + c + " constructor begin");
        char[] buffer = new char[count];
        for (int i = 0; i < count; i++) {
            buffer[i] = c;
        }
        try {
            Thread.sleep(2100);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        content = new String(buffer);
        System.out.println("RealData " + c + " constructor end");
    }

    public String getContent(){
        return  content;
    }
}
